#include <gtest/gtest.h>
#include "../core/MemoryCache.h"

TEST(MemoryCacheTest, AddWord) {
    MemoryCache cache;

    // Test adding a valid word
    int result = cache.AddWord("apple");
    EXPECT_EQ(result, 0);


    // Test adding a duplicated word
    result = cache.AddWord("apple");
    EXPECT_EQ(result, -1);

    // Test adding an invalid word
    result = cache.AddWord("");
    EXPECT_EQ(result, -2);
}
